<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <title>Document</title>
    <style>
        .hello-enter-from,.hello-leave-to {
            opacity: 0;
        }


        /*            */
        .hello-enter-active{
           /* animation: leftToRight 5s;  */
           transition: opacity 2s ease-in;  /*  opacity透明度          */
        }
        .hello-enter-to,.hello-leave-from{
         opacity: 1;

        }
       
        .hello-leave-active{

            animation: leftToRight 5s ease-out;
        }
        
    </style>
</head>
<body>
    <div id="app"></div>
</body>
    <script src="https://unpkg.com/vue@next"></script>
    <script>
        const app = Vue.createApp({
            data() {
              return {

                anniu: true
            }
        },
        methods: {
            hand(){
                this.anniu = !this.anniu
            }
        },

                template:`
                <transition name="hello" appear>
                    <div v-show="anniu">hello vue1.js!!</div>
                </transition>
                <transition name="hello1" appear>
                    <div v-show="anniu">hello CSS!!</div>
                </transition>
                <button @click="hand">按钮</button>

                `
            })

           const vm = app.mount("#app");
    </script>
</html>